/**
 * @author ens12ilt - ens12ple
 */

package model;

public class Position implements Comparable<Position>{
	private int _x;
	private int _y;
	
	public Position(int x, int y){
		_x = x;
		_y = y;
	}

	public int getX() {
		return _x;
	}

	public int getY() {
		return _y;
	}

	@Override
	public String toString() {
		return "("+_x +", "+ _y +")";
	}

	@Override
	public int compareTo(Position o) {
		if(_y < o._y){
			if(_x < o._x)
				return -1;
			else
				return 0;
		}
		return -1;
	}
	
	public int[] toVect(){
		int[] ret = new int[2];
		ret[0] = _x;
		ret[1] = _y;
		return ret;
	}
	
	
}
